package com.lzk;

import java.util.Random;

/**
 * @author King
 * @date 2021/6/24 - 9:19
 */
public class test {
    public static void main(String[] args) {
        Double money = 150.0;
        Double nowMOney = 150.0;
        Double di = 50.0;
        int daoNum = 10;
        int yidao = 0;
        Double radmoney = 0.0;

        for (int i = 0; i < daoNum; i++) {
            radmoney = nowMOney / (daoNum - yidao) * Math.random();
            nowMOney = nowMOney - radmoney;
            yidao = i + 1;
            System.out.println("第"+i+"刀，当前金额："+nowMOney+"砍价金额："+radmoney);
        }
    }
}
